package com.ethink.system.api;

import com.ethink.system.api.response.SystemRoleDetailResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.system.api.info.SystemRoleInfo;
import com.ethink.system.api.request.SystemRoleAddRequest;
import com.ethink.system.api.request.SystemRoleQueryRequest;
import com.ethink.system.api.request.SystemRoleUpdateRequest;
import com.ethink.system.api.response.SystemRoleAddResponse;
import com.ethink.system.api.response.SystemRoleDeleteResponse;
import com.ethink.system.api.response.SystemRoleUpdateResponse;
import java.util.List;

/**
 * 系统角色表 Facade接口
 *
 * @author default
 * @date 2022-09-27
 */
@FeignClient(name = "ethink-system-service", path = "system-service/facade/v1/systemRole", contextId = "systemRoleFacade")
public interface SystemRoleFacade {

    @PostMapping("/querySystemRole")
    @ResponseBody
    Page<SystemRoleInfo> querySystemRole(@RequestBody SystemRoleQueryRequest request);

    @GetMapping("/getSystemRoleById")
    @ResponseBody
    SystemRoleDetailResponse getSystemRoleById(@RequestParam("systemRoleId") Long systemRoleId);

    @PostMapping("/listSystemRole")
    @ResponseBody
    List<SystemRoleInfo> listSystemRole(@RequestBody SystemRoleQueryRequest request);

    @PostMapping("/addSystemRole")
    @ResponseBody
    SystemRoleAddResponse addSystemRole(@RequestBody SystemRoleAddRequest request);

    @PostMapping("/updateSystemRole")
    @ResponseBody
    SystemRoleUpdateResponse updateSystemRole(@RequestBody SystemRoleUpdateRequest request);

    @GetMapping("/deleteSystemRole")
    @ResponseBody
    SystemRoleDeleteResponse deleteSystemRole(@RequestParam("systemRoleId") Long systemRoleId);

}